Skip to content

ip link: add type bridge creation support#31

Merged
cathay4t merged 2 commits into
rust-netlink:mainfrom
cathay4t:main
Jun 2, 2026
Merged

ip link: add type bridge creation support#31
cathay4t merged 2 commits into
rust-netlink:mainfrom
cathay4t:main

Conversation

@cathay4t

@cathay4t cathay4t commented Jun 2, 2026

Copy link
Copy Markdown
Member

Introduced support for ip link add <name> type bridge [options] with
all 36 bridge-specific options matching the iproute2 CLI.

Also fixed display of MulticastQuerierState fields (querier IPv4/IPv6
addresses) to match iproute2 output.

Integration test cases added for bridge creation with various options.

Introduced support for `ip link add <name> type bridge [options]` with
all 36 bridge-specific options matching the iproute2 CLI.

Also fixed display of MulticastQuerierState fields (querier IPv4/IPv6
addresses) to match iproute2 output.

Integration test cases added for bridge creation with various options.

Signed-off-by: Gris Ge <cnfourt@gmail.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for creating and configuring bridge devices. It introduces the apply_bridge method to parse bridge-specific options, extracts multicast querier IP addresses, moves common parsing helpers to a shared parse module, and adds comprehensive integration tests. The review feedback suggests making the apply_bridge function synchronous since it does not perform any asynchronous operations, removing the corresponding .await call in add.rs, and refactoring the if let pattern in bridge.rs to match the existing codebase style.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/ip/link/ifaces/bridge.rs Outdated
Comment thread src/ip/link/add.rs Outdated
Comment thread src/ip/link/ifaces/bridge.rs Outdated
apply_bridge contains no .await calls, so the async annotation is
unnecessary.  Make it a regular fn and drop the .await at the call
site in add.rs.

Also replace the `if let Some(ref addr) = self.field` pattern with the
more idiomatic Rust 2024 `if let Some(addr) = &self.field` style
already used elsewhere in the file.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
@cathay4t cathay4t merged commit 020ce1f into rust-netlink:main Jun 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant